﻿@model Authoring.WebRole.Models.Tour

@{
    ViewBag.Title = "Create";
}

<h2>Tour - Create</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm("Create", "Tour", FormMethod.Post, new { enctype = "multipart/form-data" })){
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Tour</legend>

        <div class="editor-label">
            @Html.LabelFor(model => model.Name)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Name)
            @Html.ValidationMessageFor(model => model.Name)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Category)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Category)
            @Html.ValidationMessageFor(model => model.Category)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Sequence)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Sequence)
            @Html.ValidationMessageFor(model => model.Sequence)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.AudioBlobUrl)
        </div>
        <div class="editor-field">
            <input type="file" id="audioFile" name="audioFile" />
            @Html.EditorFor(model => model.AudioBlobUrl)
            @Html.ValidationMessageFor(model => model.AudioBlobUrl)
        </div>

        <div class="editor-label">
            OGG audio file
        </div>
        <div class="editor-field">
            <input type="file" id="oggAudioFile" name="oggAudioFile"  />
        </div>
  
        <div class="editor-label">
            @Html.LabelFor(model => model.IsVisible)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.IsVisible)
            @Html.ValidationMessageFor(model => model.IsVisible)
        </div>

      <p>
            <input type="submit" value="Create" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>
